package com.share.design.status.demo01;

/**
 * 1 - 下单状态
 * @author caifan
 * @since 2022/11/6
 */
public class Acknowledged implements PackageState {
    // 单例
    private static Acknowledged acknowledged = new Acknowledged();

    private Acknowledged() {}

    public static Acknowledged getInstance() {
        return acknowledged;
    }

    @Override
    public void updateState(PackageContext ctx) {
        System.out.println("starting");
        System.out.println("1-下单");
        ctx.setCurrentState(WarehouseProcessing.getInstance());
    }
}
